home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / cmds.fmt / sld.man < prev    next >
Encoding:
Text File  |  1989-03-29  |  10.8 KB  |  265 lines

  1.  
  2.  
  3.  
  4. SLD                       User Commands                       SLD
  5.  
  6.  
  7.  
  8. NNAAMMEE
  9.      sld - SPUR link editor
  10.  
  11. SSYYNNOOPPSSIISS
  12.      sslldd [ --AA _b_a_s_e_f_i_l_e ] [ --dd ] [ --ee _e_n_t_r_y ] [ --jj ] [ --ll_x ]
  13.           [ --LL_d_i_r ] [ --NN ] [ --oo _n_a_m_e ] [ --pp[[dd]] ] [ --pptt ] [ --rr ] [
  14.      --ss ] [ --SS ]
  15.           [ --TT[[tteexxtt]] _h_e_x ] [ --TTddaattaa _h_e_x ] [ --TTssddaattaa hheexx ]
  16.           [ --uu _n_a_m_e ] [ --ww ] [ --xx ] [ --XX ] [ --yy_s_y_m ] [ --zz ]
  17.           file ...
  18.  
  19. DDEESSCCRRIIPPTTIIOONN
  20.      _s_l_d combines several object programs into one, resolves
  21.      external references, and searches libraries.  In the sim-
  22.      plest case several object _f_i_l_es are given, and _s_l_d combines
  23.      them, producing an object module which can be either exe-
  24.      cuted or become the input for a further _s_l_d run.  In the
  25.      latter case, the --rr option must be given to preserve the
  26.      relocation bits. The output of _s_l_d is left on a file called
  27.      _a.._o_u_t if not otherwise specified by the --oo option.  The out-
  28.      put file is made executable only if no errors occurred dur-
  29.      ing the load, and the --NN and --rr options were not specified.
  30.  
  31.      The argument _f_i_l_es are concatenated in the order specified.
  32.      The entry point of the output is the beginning of the text
  33.      unless the --ee option is specified.
  34.  
  35.      If any _f_i_l_e is a library, it is searched exactly once at the
  36.      point it is encountered in the argument list.  Only those
  37.      routines defining an unresolved external reference are
  38.      loaded.  The library must have been processed by _r_a_n_l_i_b(1);
  39.      its first member must be a file named `__.SYMDEF', which is
  40.      the dictionary for the library.  The dictionary is searched
  41.      iteratively to satisfy as many references as possible.
  42.  
  43.      The symbols __eetteexxtt, __eeddaattaa,  __eenndd, __bbppddaattaa, and __bbppbbssss
  44.      (eetteexxtt, eeddaattaa, eenndd, bbppddaattaa, and bbppbbssss in C) are reserved,
  45.      and if referred to, are set to the first location above the
  46.      program, the first location above initialized shared data,
  47.      and the first location above all shared data, the beginning
  48.      of private initialized data, and the beginning of uninitial-
  49.      ized private data, respectively.  It is erroneous to define
  50.      these symbols.
  51.  
  52. OOPPTTIIOONNSS
  53.      Options should appear before the file names, except abbrevi-
  54.      ated library names specified by the --ll option which can
  55.      appear anywhere.
  56.  
  57.      --AA _n_a_m_e
  58.           Incremental loading: the resulting object may be read
  59.           into an already executing program. _n_a_m_e is the name of
  60.  
  61.  
  62.  
  63. SPUR Release 1.0          14 April 1987                         1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. SLD                       User Commands                       SLD
  71.  
  72.  
  73.  
  74.           a file that supplies the initial symbol table for the
  75.           resulting object file.  Only newly linked material is
  76.           entered into the text and data portions of _a.._o_u_t, but
  77.           the new symbol table will reflect all symbols defined
  78.           before and after the incremental load.  This argument
  79.           must appear before any other object file in the argu-
  80.           ment list.  One or more of the --TT options may be used
  81.           as well, and will be taken to mean that the newly
  82.           linked segments will commence at the corresponding
  83.           addresses (which must divisible by 8).  By default,
  84.           text and private data are concatenated.  The default
  85.           starting point for text is the old value of __eenndd.  The
  86.           default starting point for shared data is the old value
  87.           of __eeddaattaa__ss..  The values of __eetteexxtt, etc., are the same
  88.           for the resulting object file as they were for _n_a_m_e.
  89.  
  90.      --dd   Force definition of common storage even if the --rr flag
  91.           is present.
  92.  
  93.      --ee _e_n_t_r_y
  94.           Define the eentry point: _e_n_t_r_y argument is the name of
  95.           the entry point of the loaded program.
  96.  
  97.      --jj   Join private data to the end of text.  This is the
  98.           default for the --NN option.  The switch is ignored if
  99.           overridden by the --TTddaattaa or --ppdd options.
  100.  
  101.      --ll_x  This option is an abbreviation for the library name
  102.           `_d_i_r/lib_x.a'.  Here, _x is a string.  _D_i_r is one of the
  103.           directories listed in preceding --LL options, or, if no
  104.           such file exists, then one of the directories `/lib',
  105.           `/lib/local', or `/usr/local/lib' (tried in that
  106.           order).  A library is searched when its name is encoun-
  107.           tered, so the placement of a --ll is significant.
  108.  
  109.      --LL_d_i_r
  110.           See --ll above.
  111.  
  112.      --NN   Do not make the text portion read only or sharable.
  113.           The data portion immediately follows the text, which is
  114.           relocated to begin at address 0 (i.e., not preceded by
  115.           the header).  (Use `magic number' 0507.)
  116.  
  117.      --oo _n_a_m_e
  118.           _N_a_m_e is the name of the _s_l_d output file, instead of
  119.           aa..oouutt.
  120.  
  121.      --pp[[dd]]
  122.           `Publicize' private data segment.  The initialized
  123.           private data in each object file is concatenated to the
  124.           front of the initialized shareable data of that file,
  125.           and relocated as shareable data.  Likewise, the
  126.  
  127.  
  128.  
  129. SPUR Release 1.0          14 April 1987                         2
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. SLD                       User Commands                       SLD
  137.  
  138.  
  139.  
  140.           uninitialized private data is concatenated to the front
  141.           of the uninitialized shared data.  The -Tdata option,
  142.           if present, is ignored.  The -Tsdata option is honored,
  143.           and governs the position of the combined segment.
  144.           The names __eeddaattaa and __eenndd (eeddaattaa and eenndd in C) are set
  145.           to the values of _edata_s and _end_s, respectively.
  146.  
  147.      --pptt  Publicize text segment.  The text segments of the
  148.           object files are concatenated together at the from of
  149.           the initialized shareable data of that file, and relo-
  150.           cated as shareable data.  The -Ttext option, if
  151.           present, only affects the placement of private data
  152.           (when this follows the text segment), and has no effect
  153.           on the placement of text.  The -Tsdata option is
  154.           honored, and governs the position of the combined seg-
  155.           ment.
  156.  
  157.      --rr   Generate relocation bits in the output file so that it
  158.           can be the subject of another _s_l_d run.  This flag also
  159.           prevents final definitions from being given to common
  160.           symbols, and suppresses the `undefined symbol' diagnos-
  161.           tics.  It implies the --NN option.
  162.  
  163.      --ss   Strip the output, that is, remove the symbol table and
  164.           relocation bits to save space (but impair the useful-
  165.           ness of the debuggers).  This information can also be
  166.           removed by _s_t_r_i_p(1).
  167.  
  168.      --SS   Strip the output by removing all symbols except locals
  169.           and globals.
  170.  
  171.      --TT[[tteexxtt]] _h_e_x
  172.           Relocate as if the text (i.e., exclusive of the header)
  173.           started at address _h_e_x (a hexadecimal number, possibly
  174.           with preceding `0x').  This does _n_o_t affect where the
  175.           text is actually loaded; loading the file in the usual
  176.           way will place the text segment at its standard loca-
  177.           tion, relocated as if it were at address _h_e_x.
  178.  
  179.      --TTddaattaa_h_e_x
  180.           Relocate the private data segment as if it started at
  181.           location _h_e_x (a hexadecimal number as above).  Again,
  182.           this does not affect where the private data segments
  183.           are actually loaded.
  184.  
  185.      --TTssddaattaa_h_e_x
  186.           Relocate the shared data segment as if it started at
  187.           location _h_e_x (a hexadecimal number as above).  This
  188.           does not affect where the shared data segments are
  189.           actually loaded.
  190.  
  191.      --uu _n_a_m_e
  192.  
  193.  
  194.  
  195. SPUR Release 1.0          14 April 1987                         3
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. SLD                       User Commands                       SLD
  203.  
  204.  
  205.  
  206.           Enter _n_a_m_e as an uundefined symbol.  This is useful for
  207.           loading wholly from a library, since initially the sym-
  208.           bol table is empty and an unresolved reference is
  209.           needed to force the loading of the first routine.
  210.  
  211.      --ww   Each time an object file is automatically included from
  212.           a library, indicate the name of the object file and a
  213.           symbol that caused it to be loaded.
  214.  
  215.      --xx   Do not preserve local (non-..gglloobbll) symbols in the out-
  216.           put symbol table; only enter external symbols.  This
  217.           option saves some space in the output file.
  218.  
  219.      --XX   Save local symbols except for those whose names begin
  220.           with `L'.  This option is used by _c_c(1) to discard
  221.           internally-generated labels while retaining symbols
  222.           local to routines.
  223.  
  224.      --yy_s_y_m
  225.           Display each file in which _s_y_m appears, its type and
  226.           whether the file defines or references it.  Many such
  227.           options may be given to trace many symbols.  It is usu-
  228.           ally necessary to begin _s_y_m with an `_', as external C,
  229.           FORTRAN and Pascal variables begin with underscores.
  230.  
  231.      --zz   Arrange for the process to be loaded on demand from the
  232.           resulting executable file (0513 `magic number') rather
  233.           than preloaded. This is the default (and is present
  234.           here only for compatibility).  In the resulting object
  235.           file, the sizes of the text segment and initialized
  236.           data segments are multiples of the page size (padded
  237.           with nulls, if necessary).  When loaded in the usual
  238.           way, they all start on page boundaries, allowing easy
  239.           demand loading from the object file.  The header is
  240.           incorporated in the first page of text.  With this for-
  241.           mat the first few BSS segment symbols may actually end
  242.           up in the initialized data segment, and likewise for
  243.           SBSS segment symbols and the shared data segment; this
  244.           is to avoid wasting the space resulting from rounding
  245.           up the data segment sizes.
  246.  
  247. FFIILLEESS
  248.      /lib/lib*.a            libraries
  249.      /usr/lib/lib*.a        more libraries
  250.      /usr/local/lib/lib*.a  still more libraries
  251.      a.out                  output file
  252.  
  253. SSEEEE AALLSSOO
  254.      sas(1), ar(1), cc(1), ranlib(1), strip(1)
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261. SPUR Release 1.0          14 April 1987                         4
  262.  
  263.  
  264.  
  265.